<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%> 
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>新建网页 1</title>
<style>
<!--
body,td         { font-family: 宋体; font-size: 14px; color: #000000 }
-->
</style>
</head>

<body>

<div align="left">
	<table border="1" cellpadding="0" width="53%" style="border-collapse: collapse" bordercolor="#C0C0C0">
		<tr>
			<td bgcolor="#EEEEEE" align="center" height="30">编号</td>
			<td bgcolor="#EEEEEE" align="center" height="30">姓名</td>
			<td bgcolor="#EEEEEE" align="center" height="30">密码</td>
			<td bgcolor="#EEEEEE" align="center" height="30">昵称</td>
			<td bgcolor="#EEEEEE" align="center" height="30">组</td>
			<td bgcolor="#EEEEEE" align="center" height="30">状态</td>
		</tr>
		<c:forEach items="${list}" var="user">
		<tr>
			<td align="center" height="30">${user.id}</td>
			<td align="center" height="30">${user.username}</td>
			<td align="center" height="30">${user.password}</td>
			<td align="center" height="30">${user.nickname}</td>
			<td align="center" height="30">${user.groups.title}</td>
			<td align="center" height="30">${user.status}</td>
		</tr>
		</c:forEach>
	</table>
</div>
<form method="POST">
	<p>用户 <input type="text" name="username" size="20"></p>
	<p>密码 <input type="text" name="password" size="20"></p>
	<p>昵称 <input type="text" name="nickname" size="20"></p>
	<p>组&nbsp; 
	<select size="1" name="groups">
	    <c:forEach items="${groups}" var="group">
		<option value="${group.id}">
		<c:if test="${fn:length(group.id)==2}">${group.title}</c:if>
		<c:if test="${fn:length(group.id)==4}">&nbsp;&nbsp;${group.title}</c:if>
		<c:if test="${fn:length(group.id)==6}">&nbsp;&nbsp;&nbsp;&nbsp;${group.title}</c:if>
		</option>
		</c:forEach>
	</select>
	</p>
	<p>　</p>
	<p><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form>
</body>

</html>